let webpack = require('webpack')
let path = require('path')
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
  output: {
    filename: "index.[contenthash:8].js",
    path: path.resolve(__dirname, '../dist')
  },
  plugins: [
    new webpack.DefinePlugin({
      qqq: "888"
    }),
    new CleanWebpackPlugin(),
    new HtmlWebpackPlugin({
      template: './public/index.html', // 指定以哪个文件为模板 去产生html文件
      filename: "hello.html",
      title123: "珠峰666",// 不指定模板的时候 可以用来修改页面title
    })
  ]
}